<template>
	<div>
    <h2>搜索页面</h2>
    <div>
      <input type="number" v-model.number="badge" />
    </div>
    <button @click="updateBadge">更新badge的值</button>
  </div>
</template>

<script>
export default {
  data () {
    return {
      badge: 8
    }
  },
  methods: {
    updateBadge() {
      let badge = this.badge
      // eslint-disable-next-line
      plus.runtime.setBadgeNumber(badge)
    }
  }
}
</script>

<style lang="stylus" scoped></style>
